package cn.gson.springboot.model.pjos;

import javax.persistence.*;
import java.util.List;

@Entity
@Table(name = "schedule", schema = "springboot", catalog = "")
public class Schedule {
    private int stateId;
    private String stateName;
    private List<MaintainDetail> mainDetail;

    @Id
    @Column(name = "state_id")
    public int getStateId() {
        return stateId;
    }

    public void setStateId(int stateId) {
        this.stateId = stateId;
    }

    @Basic
    @Column(name = "state_name")
    public String getStateName() {
        return stateName;
    }

    public void setStateName(String stateName) {
        this.stateName = stateName;
    }

    @OneToMany(mappedBy = "schedu")
    public List<MaintainDetail> getMainDetail() {
        return mainDetail;
    }

    public void setMainDetail(List<MaintainDetail> mainDetail) {
        this.mainDetail = mainDetail;
    }

    @Override
    public String toString() {
        return "Schedule{" +
                "stateId=" + stateId +
                ", stateName='" + stateName + '\'' +
                '}';
    }
}
